import { useState, useEffect } from 'react'
import WeUI from 'react-WeUI'
import PropTypes from 'prop-types'
const {
    Page,
    Panel,
    PanelHeader,
    PanelBody,
    MediaBox,
    MediaBoxDescription,
    MediaBoxTitle
} = WeUI


const Address = ({address}) => {
    return (
        <Page>
            <Panel>
                <PanelHeader>地址</PanelHeader>
                <PanelBody>
                    {address.map(item => <MediaBox key={item.id} type="text">
                        <MediaBoxDescription>
                            {item.address}
                        </MediaBoxDescription>
                        <MediaBoxTitle>{item.name}</MediaBoxTitle>
                    </MediaBox>)}
                    
                </PanelBody>
            </Panel>
        </Page>
    )
}
Address.PropTypes={
    address:PropTypes.array
}
export default Address